// Tags:01Trie
#include <algorithm>
#include <cctype>
#include <cstdio>

template <typename T>
inline T &read(T &x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

typedef long long ll;

const int N = 3e5 + 5, M = 60 * N, mod = 998244353, bit = 60;

int n, cnt = 1;
int ch[M][2], sum[M];
ll x, a[N];

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen64("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen64("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("xor.in", "r", stdin);
  freopen("xor.out", "w", stdout);
#endif
#endif

  read(n), read(x);
  for (int i = 1; i <= n; ++i) read(a[i]);
  std::sort(a + 1, a + n + 1);
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    int p = 1, dp = 1;
    for (int j = bit - 1; ~j && p > 0; --j) {
      int d = (x >> j) & 1;
      int c = (a[i] >> j) & 1;
      if (!d) dp = (dp + sum[ch[p][!c]]) % mod;
      p = ch[p][c ^ d];
    }
    dp = (dp + sum[p]) % mod;
    ans = (ans + dp) % mod;
    p = 1;
    for (int j = bit - 1; ~j; --j) {
      int c = (a[i] >> j) & 1;
      if (!ch[p][c]) ch[p][c] = ++cnt;
      p = ch[p][c];
      sum[p] = (sum[p] + dp) % mod;
    }
  }
  printf("%d", ans);
  return 0;
}